package JDK8_xinDatetimeFormatter;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Test {
    public static void main(String[] args) {
        LocalDateTime ldt = LocalDateTime.now();
        System.out.println("当前日期"+ldt);
        DateTimeFormatter daf = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        String format = daf.format(ldt);
        System.out.println("格式化后的日期"+format);

    }
}
